<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width= , initial-scale=1.0">
    <title>Document</title>
</head>
<script src="../js/vue.js"></script>
<body>
    <div id="app">   
       <cpn><button>按钮</button></cpn>     
       <cpn><i>我是i标签</i></cpn>     
       <cpn><span>我是内容</span></cpn>      
       <cpn>
           <i>我是i标签</i>
           <p>我是p标签</p>
           <!-- 多个标签全部进入插槽 -->
       </cpn>     
       <cpn></cpn>     
       <cpn></cpn> 
    </div>
    <template id="cpn">
        <div>
          <h2>我是子组件</h2>
          <!-- <button>按钮</button> -->
          <slot><button>按钮</button></slot>
          <!-- 插槽可以有默认值 -->
        </div>
      </template>
    <script>
       
        const app = new Vue({
            el: '#app',    
            data: {    
            },
            methods: {
                btnClick() {
                    
                }
            },
            components: {
                cpn: {
                    template: '#cpn',
                    
                }
            }
            


        })
        
        

    </script>

</body>
</html>